/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * FormUtama.java
 *
 * Created on 15 Jun 10, 5:31:02
 */

package clinsoftbeta;


import clinsoftbeta.GUI.IFormDaftar;
import clinsoftbeta.GUI.IFormDokter;
import clinsoftbeta.GUI.IFormKeuangan;
import clinsoftbeta.GUI.IFormPasien;
import clinsoftbeta.GUI.IFormPeriksa;
import javax.swing.JOptionPane;

/**
 *
 * @author Sidiq Prihatno
 */
public class FormUtama extends javax.swing.JFrame {

    /** Creates new form FormUtama */
    public FormUtama() {
        initComponents();
        

     
    }
    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        mainPanel = new javax.swing.JPanel();
        statusPanel = new javax.swing.JPanel();
        javax.swing.JSeparator statusPanelSeparator = new javax.swing.JSeparator();
        statusMessageLabel = new javax.swing.JLabel();
        statusAnimationLabel = new javax.swing.JLabel();
        jToolBar1 = new javax.swing.JToolBar();
        btnDaftar = new javax.swing.JButton();
        jSeparator4 = new javax.swing.JToolBar.Separator();
        btnPeriksa = new javax.swing.JButton();
        jSeparator1 = new javax.swing.JToolBar.Separator();
        btnPasien = new javax.swing.JButton();
        jSeparator3 = new javax.swing.JToolBar.Separator();
        btnDokter = new javax.swing.JButton();
        jSeparator2 = new javax.swing.JToolBar.Separator();
        btnKeuangan = new javax.swing.JButton();
        menuBar = new javax.swing.JMenuBar();
        javax.swing.JMenu fileMenu = new javax.swing.JMenu();
        mnuDaftar = new javax.swing.JMenuItem();
        mnuPeriksa = new javax.swing.JMenuItem();
        mnuPasien = new javax.swing.JMenuItem();
        mnuDokter = new javax.swing.JMenuItem();
        mnuKeluar = new javax.swing.JMenuItem();
        javax.swing.JMenu helpMenu = new javax.swing.JMenu();
        mnuAbout = new javax.swing.JMenuItem();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle("ClinSoftBeta");

        mainPanel.setBackground(new java.awt.Color(153, 204, 255));

        javax.swing.GroupLayout mainPanelLayout = new javax.swing.GroupLayout(mainPanel);
        mainPanel.setLayout(mainPanelLayout);
        mainPanelLayout.setHorizontalGroup(
            mainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 1123, Short.MAX_VALUE)
        );
        mainPanelLayout.setVerticalGroup(
            mainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 602, Short.MAX_VALUE)
        );

        getContentPane().add(mainPanel, java.awt.BorderLayout.CENTER);

        statusPanel.setBackground(new java.awt.Color(255, 255, 255));

        statusAnimationLabel.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);

        javax.swing.GroupLayout statusPanelLayout = new javax.swing.GroupLayout(statusPanel);
        statusPanel.setLayout(statusPanelLayout);
        statusPanelLayout.setHorizontalGroup(
            statusPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(statusPanelSeparator, javax.swing.GroupLayout.DEFAULT_SIZE, 1123, Short.MAX_VALUE)
            .addGroup(statusPanelLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(statusMessageLabel)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 1103, Short.MAX_VALUE)
                .addComponent(statusAnimationLabel)
                .addContainerGap())
        );
        statusPanelLayout.setVerticalGroup(
            statusPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(statusPanelLayout.createSequentialGroup()
                .addComponent(statusPanelSeparator, javax.swing.GroupLayout.PREFERRED_SIZE, 2, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(statusPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(statusMessageLabel)
                    .addComponent(statusAnimationLabel))
                .addGap(3, 3, 3))
        );

        getContentPane().add(statusPanel, java.awt.BorderLayout.SOUTH);

        jToolBar1.setBackground(new java.awt.Color(255, 255, 255));
        jToolBar1.setRollover(true);

        btnDaftar.setBackground(new java.awt.Color(255, 255, 255));
        btnDaftar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/clinsoftbeta/resources/PatientFile.png"))); // NOI18N
        btnDaftar.setText("Daftar");
        btnDaftar.setFocusable(false);
        btnDaftar.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        btnDaftar.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        btnDaftar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnDaftarActionPerformed(evt);
            }
        });
        jToolBar1.add(btnDaftar);
        jToolBar1.add(jSeparator4);

        btnPeriksa.setBackground(new java.awt.Color(255, 255, 255));
        btnPeriksa.setIcon(new javax.swing.ImageIcon(getClass().getResource("/clinsoftbeta/resources/Stethoscope.png"))); // NOI18N
        btnPeriksa.setText("Periksa");
        btnPeriksa.setFocusable(false);
        btnPeriksa.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        btnPeriksa.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        btnPeriksa.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnPeriksaActionPerformed(evt);
            }
        });
        jToolBar1.add(btnPeriksa);
        jToolBar1.add(jSeparator1);

        btnPasien.setBackground(new java.awt.Color(255, 255, 255));
        btnPasien.setIcon(new javax.swing.ImageIcon(getClass().getResource("/clinsoftbeta/resources/PatientMale.png"))); // NOI18N
        btnPasien.setText("Pasien");
        btnPasien.setFocusable(false);
        btnPasien.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        btnPasien.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        btnPasien.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnPasienActionPerformed(evt);
            }
        });
        jToolBar1.add(btnPasien);
        jToolBar1.add(jSeparator3);

        btnDokter.setBackground(new java.awt.Color(255, 255, 255));
        btnDokter.setIcon(new javax.swing.ImageIcon(getClass().getResource("/clinsoftbeta/resources/DoctorMale.png"))); // NOI18N
        btnDokter.setText("Dokter");
        btnDokter.setFocusable(false);
        btnDokter.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        btnDokter.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        btnDokter.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnDokterActionPerformed(evt);
            }
        });
        jToolBar1.add(btnDokter);
        jToolBar1.add(jSeparator2);

        btnKeuangan.setBackground(new java.awt.Color(255, 255, 255));
        btnKeuangan.setIcon(new javax.swing.ImageIcon(getClass().getResource("/clinsoftbeta/resources/Hospital.png"))); // NOI18N
        btnKeuangan.setText("Keuangan");
        btnKeuangan.setFocusable(false);
        btnKeuangan.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        btnKeuangan.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        btnKeuangan.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnKeuanganActionPerformed(evt);
            }
        });
        jToolBar1.add(btnKeuangan);

        getContentPane().add(jToolBar1, java.awt.BorderLayout.NORTH);

        fileMenu.setText("File");
        fileMenu.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                fileMenuActionPerformed(evt);
            }
        });

        mnuDaftar.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_END, 0));
        mnuDaftar.setText("Pendaftaran");
        mnuDaftar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mnuDaftarActionPerformed(evt);
            }
        });
        fileMenu.add(mnuDaftar);

        mnuPeriksa.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_INSERT, 0));
        mnuPeriksa.setText("Input Data Periksa");
        mnuPeriksa.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mnuPeriksaActionPerformed(evt);
            }
        });
        fileMenu.add(mnuPeriksa);

        mnuPasien.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_HOME, 0));
        mnuPasien.setText("Input Data Pasien");
        mnuPasien.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mnuPasienActionPerformed(evt);
            }
        });
        fileMenu.add(mnuPasien);

        mnuDokter.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_PAGE_UP, 0));
        mnuDokter.setText("Input Data Dokter");
        mnuDokter.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mnuDokterActionPerformed(evt);
            }
        });
        fileMenu.add(mnuDokter);

        mnuKeluar.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F4, java.awt.event.InputEvent.ALT_MASK));
        mnuKeluar.setText("Keluar");
        mnuKeluar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mnuKeluarActionPerformed(evt);
            }
        });
        fileMenu.add(mnuKeluar);

        menuBar.add(fileMenu);

        helpMenu.setText("Help");

        mnuAbout.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F1, 0));
        mnuAbout.setText("About");
        mnuAbout.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mnuAboutActionPerformed(evt);
            }
        });
        helpMenu.add(mnuAbout);

        menuBar.add(helpMenu);

        setJMenuBar(menuBar);

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void mnuDaftarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mnuDaftarActionPerformed
        // TODO add your handling code here:
        IFormDaftar iFormDaftar = new IFormDaftar();
        mainPanel.add(iFormDaftar);
        iFormDaftar.setVisible(true);
}//GEN-LAST:event_mnuDaftarActionPerformed

    private void mnuPeriksaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mnuPeriksaActionPerformed
        // TODO add your handling code here:
        IFormPeriksa iFormPeriksa = new IFormPeriksa();
        mainPanel.add(iFormPeriksa);
        iFormPeriksa.setVisible(true);
}//GEN-LAST:event_mnuPeriksaActionPerformed

    private void mnuPasienActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mnuPasienActionPerformed
        // TODO add your handling code here:
        IFormPasien iFormPasien = new IFormPasien();
        mainPanel.add(iFormPasien);
        iFormPasien.setVisible(true);
    }//GEN-LAST:event_mnuPasienActionPerformed

    private void mnuDokterActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mnuDokterActionPerformed
        // TODO add your handling code here:
        IFormDokter iFormDokter = new IFormDokter();
        mainPanel.add(iFormDokter);
        iFormDokter.setVisible(true);
}//GEN-LAST:event_mnuDokterActionPerformed

    private void mnuKeluarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mnuKeluarActionPerformed
        // TODO add your handling code here:
        if (JOptionPane.showConfirmDialog(null, "Apakah anda yakin ingin keluar?", "Pertanyaan", JOptionPane.YES_NO_OPTION,
                JOptionPane.QUESTION_MESSAGE) == JOptionPane.YES_OPTION) {
            System.exit(0);
        }
        
    }//GEN-LAST:event_mnuKeluarActionPerformed

    private void fileMenuActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_fileMenuActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_fileMenuActionPerformed

    private void btnDaftarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnDaftarActionPerformed
        // TODO add your handling code here:
        IFormDaftar iFormDaftar = new IFormDaftar();
        mainPanel.add(iFormDaftar);
        iFormDaftar.setVisible(true);
    }//GEN-LAST:event_btnDaftarActionPerformed

    private void btnPasienActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnPasienActionPerformed
        // TODO add your handling code here:
        IFormPasien iFormPasien = new IFormPasien();
        mainPanel.add(iFormPasien);
        iFormPasien.setVisible(true);
}//GEN-LAST:event_btnPasienActionPerformed

    private void btnPeriksaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnPeriksaActionPerformed
        // TODO add your handling code here:
        IFormPeriksa iFormPeriksa = new IFormPeriksa();
        mainPanel.add(iFormPeriksa);
        iFormPeriksa.setVisible(true);
}//GEN-LAST:event_btnPeriksaActionPerformed

    private void btnDokterActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnDokterActionPerformed
        // TODO add your handling code here:
        IFormDokter iFormDokter = new IFormDokter();
        mainPanel.add(iFormDokter);
        iFormDokter .setVisible(true);
    }//GEN-LAST:event_btnDokterActionPerformed

    private void btnKeuanganActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnKeuanganActionPerformed
        // TODO add your handling code here:
        IFormKeuangan iFormKeuangan = new IFormKeuangan();
        mainPanel.add(iFormKeuangan);
        iFormKeuangan.setVisible(true);
    }//GEN-LAST:event_btnKeuanganActionPerformed

    private void mnuAboutActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mnuAboutActionPerformed
        // TODO add your handling code here:
       IFormAbout iFormAbout = new IFormAbout();
       mainPanel.add(iFormAbout);
       iFormAbout.setVisible(true);
    }//GEN-LAST:event_mnuAboutActionPerformed

    /**
    * @param args the command line arguments
    */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new FormUtama().setVisible(true);
            }
        });
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton btnDaftar;
    private javax.swing.JButton btnDokter;
    private javax.swing.JButton btnKeuangan;
    private javax.swing.JButton btnPasien;
    private javax.swing.JButton btnPeriksa;
    private javax.swing.JToolBar.Separator jSeparator1;
    private javax.swing.JToolBar.Separator jSeparator2;
    private javax.swing.JToolBar.Separator jSeparator3;
    private javax.swing.JToolBar.Separator jSeparator4;
    private javax.swing.JToolBar jToolBar1;
    private javax.swing.JPanel mainPanel;
    private javax.swing.JMenuBar menuBar;
    private javax.swing.JMenuItem mnuAbout;
    private javax.swing.JMenuItem mnuDaftar;
    private javax.swing.JMenuItem mnuDokter;
    private javax.swing.JMenuItem mnuKeluar;
    private javax.swing.JMenuItem mnuPasien;
    private javax.swing.JMenuItem mnuPeriksa;
    private javax.swing.JLabel statusAnimationLabel;
    private javax.swing.JLabel statusMessageLabel;
    private javax.swing.JPanel statusPanel;
    // End of variables declaration//GEN-END:variables

}
